All right, how to create submenus? Menu2.h looks good, but I haven't figured out how to do submenus. Menu2_Create() has got this inviting paramater which function should be called when a submenu is needed, but no way to open a submenu. This is because whenever you use Menu2_Open, all other menus are closed, so you'd end up with a submenu without a mainmenu...
Menu.h on the other hand has got a Menu_AddSubMenu function, which is the one I used inn menu_setup(). If you attach a submenu using this there are two things you *must* bear in mind, though.
1. DON'T PUT SUBMENU ARROWS IN YOUR MAINMENU DEFINITION! Menu_AddSubMenu will do that for you. If you do it as well, things won't work!
2. Menu_AddSubMenu puts the submenu handle in the appropriate field of the main menu block. This means that the opening of the submenu is handled by the WIMP. This in turn means that when the submenu is opened, it's *not* done using Menu_Show() and therefore the variable menu_currentopen *will not be updated* and can't be used to find out, from which menu a selection was made!
To get around problem 2 (and do some more investigation into the event pollblock, as promised :), event->data.selection is used with Wimp_DecodeMenu() to make a bit more sense of the selection array. Just to show how things work, both the string returned by Wimp_DecodeMenu() and the first three selection entries are shown in the display window to illustrate what's going on. Selection[0] shows the main menu selection, Selection[1] the submenu selection and Selection[2] the subsubmenu selection. Notice how the selection field after the level the selection was made at always contains a -1.